#pragma once
#include <streams.h>
#include <atlbase.h>
#include <atlcom.h>
class CJRtpRecVideo;
class CH263Decodec;
typedef struct _RtpSession RtpSession;
class CVideoRecHelper
{
public:
	CVideoRecHelper(void);
	~CVideoRecHelper(void);
public:
	CComPtr<ICaptureGraphBuilder2> m_pCaptureGraphBuilder;
	CComPtr<IGraphBuilder> m_pGraph;
	CComPtr<IMediaControl> m_pControl;
	CComPtr<IBaseFilter>   m_pNullRenderer;
	CJRtpRecVideo*         m_pRtpRec;
	CComPtr<IBaseFilter>   m_pIRender;

	CComPtr<IBaseFilter>   m_pIDecodec;
	CH263Decodec *         m_pDecodec;
	int init(void);
public:
	HWND window_id;
	IPin * CVideoRecHelper::GetPin(IBaseFilter *pFilter, PIN_DIRECTION PinDir);
	int RunVideoRecGraph(RtpSession* session);
};
